(function() {
    function refreshRem() {
        document.documentElement.style.fontSize = window.innerWidth / 750 * 100 + 'px'
    }
    refreshRem()
    var tid = null
    window.addEventListener('resize', function() {
        clearTimeout(tid);
        tid = setTimeout(refreshRem, 300);
    }, false);
})()

function formatNumber (n) {
    n = n.toString()
    return n[1] ? n : '0' + n
}

function formatTime(date) {
    var hour = date.getHours()
    var minute = date.getMinutes()
    var second = date.getSeconds()
  
    return [hour, minute, second].map(formatNumber).join(':')
}
